home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / Pascal OS8 / Everything / DModalTextData.p < prev    next >
Encoding:
Text File  |  1998-10-30  |  3.6 KB  |  231 lines  |  [TEXT/CWIE]

  1. { DModalTextData.p -- data container class for Everything}
  2.  
  3. Unit DModalTextData;
  4. Interface
  5.  
  6. Uses
  7.     Types,
  8.     OSUtils,
  9.  
  10.  
  11.     AMSignaler;
  12.  
  13. const
  14.     idSmall2        = longint ('Sma2');
  15.     idLarge2        = longint ('Lar2');
  16.     idX12346        = longint ('X146');
  17.     idX12345e7        = longint ('X127');
  18.     idPassword2        = longint ('Pas2');
  19.     idDate2        = longint ('Dat2');
  20.     idTime2        = longint ('Tim2');
  21.     idStyled2        = longint ('Sty2');
  22.  
  23. type
  24.     {----------}
  25.     DModalTextData    = object (AMSignaler)
  26.  
  27.     {data members}
  28.         mSmall2:        Str255;
  29.         mLarge2:        Str255;
  30.         mX12346:        SInt32;
  31.         mX12345e7:        double;
  32.         mPassword2:        Str255;
  33.         mDate2:        LongDateRec;
  34.         mTime2:        LongDateRec;
  35.         mStyled2:        Str255;
  36.  
  37.     {methods}
  38.         Procedure Initialize; Override;
  39.  
  40.         Function  GetSmall2: Str255;
  41.         Procedure SetSmall2    (inValue:        Str255);
  42.         Function  GetLarge2: Str255;
  43.         Procedure SetLarge2    (inValue:        Str255);
  44.         Function  GetX12346: SInt32;
  45.         Procedure SetX12346    (inValue:        SInt32);
  46.         Function  GetX12345e7: double;
  47.         Procedure SetX12345e7    (inValue:        double);
  48.         Function  GetPassword2: Str255;
  49.         Procedure SetPassword2    (inValue:        Str255);
  50.         Function  GetDate2: LongDateRec;
  51.         Procedure SetDate2    (inValue:        LongDateRec);
  52.         Function  GetTime2: LongDateRec;
  53.         Procedure SetTime2    (inValue:        LongDateRec);
  54.         Function  GetStyled2: Str255;
  55.         Procedure SetStyled2    (inValue:        Str255);
  56.     end;
  57.  
  58. {----------}
  59. Function NewDModalTextData: DModalTextData;
  60.  
  61. {----------}
  62. Implementation
  63.  
  64. {----------}
  65. Function NewDModalTextData: DModalTextData;
  66. var
  67.     data:        DModalTextData;
  68. begin
  69.     data := nil;
  70.     New (data);
  71.     if data <> nil then begin
  72.         data.Initialize;
  73.     end;
  74.     NewDModalTextData := data;
  75. end;
  76.  
  77. {----------}
  78. Procedure DModalTextData.Initialize;
  79. begin
  80.     inherited Initialize;
  81.  
  82.     mSmall2 := 'small';
  83.     mLarge2 := 'large';
  84.     mX12346 := 0;
  85.     mX12345e7 := 0.0;
  86.     mPassword2 := 'password';
  87.     mDate2.eraAlt := 0;
  88.     GetTime (mDate2.oldDate);
  89.     mTime2.eraAlt := 0;
  90.     GetTime (mTime2.oldDate);
  91.     mStyled2 := 'styled';
  92. end;
  93.  
  94. {----------}
  95. Function DModalTextData.GetSmall2: Str255;
  96. begin
  97.     GetSmall2 := mSmall2;
  98.  
  99.  
  100. end;
  101.  
  102. Procedure DModalTextData.SetSmall2 (
  103.     inValue:        Str255);
  104. begin
  105.     mSmall2 := inValue;
  106.  
  107.  
  108.     SignalDataChanged (idSmall2);
  109. end;
  110.  
  111. {----------}
  112. Function DModalTextData.GetLarge2: Str255;
  113. begin
  114.     GetLarge2 := mLarge2;
  115.  
  116.  
  117. end;
  118.  
  119. Procedure DModalTextData.SetLarge2 (
  120.     inValue:        Str255);
  121. begin
  122.     mLarge2 := inValue;
  123.  
  124.  
  125.     SignalDataChanged (idLarge2);
  126. end;
  127.  
  128. {----------}
  129. Function DModalTextData.GetX12346: SInt32;
  130. begin
  131.     GetX12346 := mX12346;
  132.  
  133.  
  134. end;
  135.  
  136. Procedure DModalTextData.SetX12346 (
  137.     inValue:        SInt32);
  138. begin
  139.     mX12346 := inValue;
  140.  
  141.  
  142.     SignalDataChanged (idX12346);
  143. end;
  144.  
  145. {----------}
  146. Function DModalTextData.GetX12345e7: double;
  147. begin
  148.     GetX12345e7 := mX12345e7;
  149.  
  150.  
  151. end;
  152.  
  153. Procedure DModalTextData.SetX12345e7 (
  154.     inValue:        double);
  155. begin
  156.     mX12345e7 := inValue;
  157.  
  158.  
  159.     SignalDataChanged (idX12345e7);
  160. end;
  161.  
  162. {----------}
  163. Function DModalTextData.GetPassword2: Str255;
  164. begin
  165.     GetPassword2 := mPassword2;
  166.  
  167.  
  168. end;
  169.  
  170. Procedure DModalTextData.SetPassword2 (
  171.     inValue:        Str255);
  172. begin
  173.     mPassword2 := inValue;
  174.  
  175.  
  176.     SignalDataChanged (idPassword2);
  177. end;
  178.  
  179. {----------}
  180. Function DModalTextData.GetDate2: LongDateRec;
  181. begin
  182.     GetDate2 := mDate2;
  183.  
  184.  
  185. end;
  186.  
  187. Procedure DModalTextData.SetDate2 (
  188.     inValue:        LongDateRec);
  189. begin
  190.     mDate2 := inValue;
  191.  
  192.  
  193.     SignalDataChanged (idDate2);
  194. end;
  195.  
  196. {----------}
  197. Function DModalTextData.GetTime2: LongDateRec;
  198. begin
  199.     GetTime2 := mTime2;
  200.  
  201.  
  202. end;
  203.  
  204. Procedure DModalTextData.SetTime2 (
  205.     inValue:        LongDateRec);
  206. begin
  207.     mTime2 := inValue;
  208.  
  209.  
  210.     SignalDataChanged (idTime2);
  211. end;
  212.  
  213. {----------}
  214. Function DModalTextData.GetStyled2: Str255;
  215. begin
  216.     GetStyled2 := mStyled2;
  217.  
  218.  
  219. end;
  220.  
  221. Procedure DModalTextData.SetStyled2 (
  222.     inValue:        Str255);
  223. begin
  224.     mStyled2 := inValue;
  225.  
  226.  
  227.     SignalDataChanged (idStyled2);
  228. end;
  229.  
  230. end.
  231.